<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- functionlist.qdoc -->
  <title>JavaScript对象和函数列表 | Qt QML 5.12.3</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="main">
    <div class="main-rounded">
      <div class="navigationbar">
        <table><tr>
<td ><a href="../qtdoc/index.html">Qt 5.12</a></td><td ><a href="qtqml-index.html">Qt QML</a></td><td >
			JavaScript对象和函数列表</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right"><a href="qtqml-index.html">Qt 5.12.3 参考指南</a></td>
        </tr></table>
      </div>
    </div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<div class="toc">
<h3><a name="toc">目录</a></h3>
<ul>
<li class="level1"><a href="#the-global-object">全局对象</a></li>
<li class="level2"><a href="#value-properties"><span lang="zh-cn">值属性</span></a></li>
<li class="level2"><a href="#function-properties">函数属性</a></li>
<li class="level2"><a href="#constructor-properties">构造函数属性</a></li>
<li class="level2"><a href="#other-properties">其他属性</a></li>
<li class="level1"><a href="#the-object-object"><span lang="zh-cn">Object</span>对象</a></li>
<li class="level2"><a href="#object-constructor">对象的构造函数</a></li>
<li class="level2"><a href="#object-prototype">对象原型</a></li>
<li class="level1"><a href="#function-objects">函数对象</a></li>
<li class="level2"><a href="#function-prototype">函数原型</a></li>
<li class="level1"><a href="#array-objects">数组对象</a></li>
<li class="level2"><a href="#array-prototype-object">原型对象数组</a></li>
<li class="level1"><a href="#string-objects">字符串对象</a></li>
<li class="level2"><a href="#string-prototype-object">字符串原型对象</a></li>
<li class="level1"><a href="#boolean-objects">布尔对象</a></li>
<li class="level2"><a href="#boolean-prototype-object">布尔的原型对象</a></li>
<li class="level1"><a href="#number-objects">Number<span lang="zh-cn"> 对象</span></a></li>
<li class="level2"><a href="#number-prototype-object">数字原型对象</a></li>
<li class="level2"><a href="#the-number-object">Number <span lang="zh-cn">对象</span></a></li>
<li class="level1"><a href="#the-math-object">数学对象</a></li>
<li class="level2"><a href="#value-properties">值属性</a></li>
<li class="level2"><a href="#function-properties">函数属性</a></li>
<li class="level1"><a href="#date-objects">Date<span lang="zh-cn">对象</span></a></li>
<li class="level2"><a href="#date-prototype-object">日期原型对象</a></li>
<li class="level1"><a href="#regexp-objects">RegExp <span lang="zh-cn">对象</span></a></li>
<li class="level2"><a href="#regexp-prototype-object">RegExp <span lang="zh-cn">
原型对象</span></a></li>
<li class="level1"><a href="#error-objects">Error <span lang="zh-cn">对象</span></a></li>
<li class="level2"><a href="#error-prototype-object">Error 原型对象</a></li>
<li class="level1"><a href="#the-json-object">JSON对象</a></li>
<li class="level2"><a href="#function-properties">函数属性</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">JavaScript对象和函数列表</h1>
<span class="subtitle"></span>
<!-- $$$qtqml-javascript-functionlist.html-description -->
<div class="descr"> <a name="details"></a>
<p>
<a href="http://www.ecma-international.org/publications/standards/Ecma-262.htm">ECMA-262</a> 
此引用包含<a href="qqmlengine.html">QML引擎</a>支持的对象、函数和属性列表。有关详细描述，请参见<a href="http://www.ecma-international.org/publications/standards/Ecma-262.htm">ECMA-262</a>规范。</p>
<h2 id="the-global-object">全局对象</h2>
<a name="value-properties"></a>
<h3 >值属性</h3>
<ul>
<li>NaN</li>
<li>Infinity</li>
<li>undefined</li>
</ul>
<a name="function-properties"></a>
<h3 ><span lang="zh-cn">函数属性</span></h3>
<ul>
<li>eval(x)</li>
<li>parseInt(string, radix)</li>
<li>parseFloat(string)</li>
<li>isNaN(number)</li>
<li>isFinite(number)</li>
<li>decodeURI(encodedURI)</li>
<li>decodeURIComponent(encodedURIComponent)</li>
<li>encodeURI(uri)</li>
<li>encodeURIComponent(uriComponent)</li>
<li>escape(string)</li>
<li>unescape(string)</li>
</ul>
<h3 >构造函数属性</h3>
<ul>
<li>Object</li>
<li>Function</li>
<li>Array</li>
<li>ArrayBuffer</li>
<li>String</li>
<li>Boolean</li>
<li>Number</li>
<li>DataView</li>
<li>Date</li>
<li>Promise</li>
<li>RegExp</li>
<li>Map</li>
<li>WeakMap</li>
<li>Set</li>
<li>WeakSet</li>
<li>SharedArrayBuffer</li>
<li>Symbol</li>
<li>Error</li>
<li>EvalError</li>
<li>RangeError</li>
<li>ReferenceError</li>
<li>SyntaxError</li>
<li>TypeError</li>
<li>URIError</li>
</ul>
<h3 >其他属性</h3>
<ul>
<li>Atomics</li>
<li>Math</li>
<li>JSON</li>
<li>Reflect</li>
<li>Proxy</li>
</ul>
<a name="the-object-object"></a>
<h2 id="the-object-object">Object<span lang="zh-cn">对象</span></h2>
<a name="object-constructor"></a>
<h3 >对象的构造函数</h3>
<a name="function-properties"></a>
<h4 >函数属性</h4>
<ul>
<li>getPrototypeOf(O)</li>
<li>setPrototypeOf(O, P)</li>
<li>getOwnPropertyDescriptor(O, P)</li>
<li>getOwnPropertyDescriptors(O)</li>
<li>getOwnPropertyNames(O)</li>
<li>getOwnPropertySymbols(O)</li>
<li>assign(O [, Properties])</li>
<li>create(O [, Properties])</li>
<li>defineProperty(O, P, Attributes)</li>
<li>defineProperties(O, Properties)</li>
<li>entries(O)</li>
<li>is(V1, V2)</li>
<li>keys(O)</li>
<li>values(O)</li>
<li>seal(O)</li>
<li>isSealed(O)</li>
<li>freeze(O)</li>
<li>isFrozen(O)</li>
<li>preventExtensions(O)</li>
<li>isExtensible(O)</li>
</ul>
<a name="object-prototype"></a>
<h3 >对象原型</h3>
<a name="function-properties"></a>
<h4 >函数原型</h4>
<ul>
<li>toString()</li>
<li>toLocaleString()</li>
<li>valueOf()</li>
<li>hasOwnProperty(V)</li>
<li>isPrototypeOf(V)</li>
<li>propertyIsEnumerable(V)</li>
<li>__defineGetter__(P, F)</li>
<li>__defineSetter__(P, F)</li>
</ul>
<h2 id="function-objects">函数对象</h2>
<a name="function-prototype"></a>
<h3 >函数原型</h3>
<a name="function-properties"></a>
<h4 >函数属性</h4>
<ul>
<li>toString()</li>
<li>apply(thisArg, argArray)</li>
<li>call(thisArg [, arg1 [, arg2, ..&#x2e;]])</li>
<li>bind((thisArg [, arg1 [, arg2, …]])</li>
<li>[Symbol.hasInstance](O)</li>
</ul>
<a name="array-objects"></a>
<h2 id="array-objects">数组对象</h2>
<h3 >原型对象数组</h3>
<a name="function-properties"></a>
<h4 >函数属性</h4>
<ul>
<li>toString()</li>
<li>toLocaleString()</li>
<li>concat([item1 [, item2 [, ..&#x2e;]]])</li>
<li>copyWithin([item1 [, item2 [, ..&#x2e;]]])</li>
<li>entries()</li>
<li>fill(item [, index1 [, index2]])</li>
<li>join(separator)</li>
<li>find(callbackfn [, thisArg]) // ECMAScript 6: 在Qt 5.9 中新增</li>
<li>findIndex(callbackfn [, thisArg]) // ECMAScript 6: 在Qt 5.9 中新增</li>
<li>includes(item)</li>
<li>keys()</li>
<li>pop()</li>
<li>push([item1 [, item2 [, ..&#x2e;]]])</li>
<li>reverse()</li>
<li>shift()</li>
<li>slice(start, end)</li>
<li>sort(comparefn)</li>
<li>splice(start, deleteCount[, item1 [, item2 [, ..&#x2e;]]])</li>
<li>unshift([item1 [, item2 [, ..&#x2e;]]])</li>
<li>indexOf(searchElement [, fromIndex])</li>
<li>lastIndexOf(searchElement [, fromIndex])</li>
<li>every(callbackfn [, thisArg])</li>
<li>some(callbackfn [, thisArg])</li>
<li><a href="../qtcore/containers.html#foreach">forEach</a>(callbackfn [, thisArg])</li>
<li>map(callbackfn [, thisArg])</li>
<li>filter(callbackfn [, thisArg])</li>
<li>reduce(callbackfn [, initialValue])</li>
<li>reduceRight(callbackfn [, initialValue])</li>
<li>values()</li>
<li>[Symbol.iterator]()</li>
</ul>
<a name="string-objects"></a>
<h2 id="string-objects">字符串对象</h2>
<a name="string-prototype-object"></a>
<h3 >字符串原型对象</h3>
<a name="function-properties"></a>
<h4 >函数属性</h4>
<ul>
<li>toString()</li>
<li>valueOf()</li>
<li>charAt(pos)</li>
<li>charCodeAt(pos)</li>
<li>codePointAt(pos)</li>
<li>concat([string1 [, string2 [, ..&#x2e;]]])</li>
<li>endsWith(searchString [, endPosition ]) // ECMAScript 6: 在Qt 5.8 中新增</li>
<li>includes(searchString [, position ]) // ECMAScript 6: Added in 5.8</li>
<li>indexOf(searchString ,position)</li>
<li>lastIndexOf(searchString, position)</li>
<li>localeCompare(that)</li>
<li>match(regexp)</li>
<li>normalize()</li>
<li>padEnd(length [, string])</li>
<li>padStart(length [, string])</li>
<li>repeat(count) // ECMAScript 6: 在Qt 5.9 中新增</li>
<li>replace(searchValue, replaceValue)</li>
<li>search(regexp)</li>
<li>slice(start, end)</li>
<li>split(separator, limit)</li>
<li>startsWith(searchString [, position ]) // ECMAScript 6: 在Qt 5.8 中新增</li>
<li>substr(start, length)</li>
<li>substring(start, end)</li>
<li>toLowerCase()</li>
<li>toLocaleLowerCase()</li>
<li>toUpperCase()</li>
<li>toLocaleUpperCase()</li>
<li>trim()</li>
<li>[Symbol.iterator]()</li>
</ul>
<p>此外，QML引擎还向<a href="qml-qtqml-string.html">String</a>原型添加了以下函数:</p>
<ul>
<li><a href="qml-qtqml-string.html#arg-method">arg()</a></li>
</ul>
<h2 id="boolean-objects">布尔对象</h2>
<a name="boolean-prototype-object"></a>
<h3 >布尔的原型对象</h3>
<a name="function-properties"></a>
<h4 >函数属性</h4>
<ul>
<li>toString()</li>
<li>valueOf()</li>
</ul>
<a name="number-objects"></a>
<h2 id="number-objects">Number <span lang="zh-cn">对象</span></h2>
<a name="number-prototype-object"></a>
<h3 >数字原型对象</h3>
<a name="function-properties"></a>
<h4 >函数属性</h4>
<ul>
<li>toString(radix)</li>
<li>toLocaleString()</li>
<li>valueOf()</li>
<li>toFixed(fractionDigits)</li>
<li>toExponential(fractionDigits)</li>
<li>toPrecision(precision)</li>
</ul>
<p>此外，QML引擎还向<a href="qml-qtqml-number.html">Number</a>原型添加了以下函数:</p>
<ul>
<li><a href="qml-qtqml-number.html#fromLocaleString-method">fromLocaleString(locale, number)</a></li>
<li><a href="qml-qtqml-number.html#toLocaleCurrencyString-method">toLocaleCurrencyString(locale, symbol)</a></li>
<li><a href="qml-qtqml-number.html#toLocaleString-method">toLocaleString(locale, format, precision)</a></li>
</ul>
<a name="the-number-object"></a>
<h3 >Number <span lang="zh-cn">对象</span></h3>
<a name="value-properties"></a>
<h4 >值属性</h4>
<ul>
<li>NaN</li>
<li>NEGATIVE_INFINITY</li>
<li>POSITIVE_INFINITY</li>
<li>MAX_VALUE</li>
<li>MIN_VALUE</li>
<li>EPSILON // ECMAScript 6: 在Qt 5.8 中新增</li>
<li>MAX_SAFE_INTEGER</li>
<li>MIN_SAFE_INTEGER</li>
</ul>
<a name="function-properties"></a>
<h4 >函数属性</h4>
<ul>
<li>isFinite(x) // ECMAScript 6: 在Qt 5.8 中新增</li>
<li>isInteger(x)</li>
<li>isSafeInteger(x)</li>
<li>isNaN(x) // ECMAScript 6: 在Qt 5.8 中新增</li>
</ul>
<a name="the-math-object"></a>
<h2 id="the-math-object">Math<span lang="zh-cn"> 对象</span></h2>
<a name="value-properties"></a>
<h3 >值属性</h3>
<ul>
<li>E</li>
<li>LN10</li>
<li>LN2</li>
<li>LOG2E</li>
<li>LOG10E</li>
<li>PI</li>
<li>SQRT1_2</li>
<li>SQRT2</li>
</ul>
<a name="function-properties"></a>
<h3 >函数属性</h3>
<ul>
<li>abs(x)</li>
<li>acos(x)</li>
<li>acosh(x)</li>
<li>asin(x)</li>
<li>asinh(x)</li>
<li>atan(x)</li>
<li>atanh(x)</li>
<li>atan2(y, x)</li>
<li>cbrt(x)</li>
<li>ceil(x)</li>
<li>clz32(x)</li>
<li>cos(x)</li>
<li>cosh(x)</li>
<li>exp(x)</li>
<li>expm1(x)</li>
<li>floor(x)</li>
<li>fround(x)</li>
<li>hypot(x, y)</li>
<li>imul(x, y)</li>
<li>log(x)</li>
<li>log10(x)</li>
<li>log1p(x)</li>
<li>log2(x)</li>
<li>max([value1 [, value2 [, ..&#x2e;]]])</li>
<li>min([value1 [, value2 [, ..&#x2e;]]])</li>
<li>pow(x, y)</li>
<li>random()</li>
<li>round(x)</li>
<li>sign(x) // ECMAScript 6: 在Qt 5.8 中新增</li>
<li>sin(x)</li>
<li>sinh(x)</li>
<li>sqrt(x)</li>
<li>tan(x)</li>
<li>tanh(x)</li>
<li>trunc(x)</li>
</ul>
<a name="date-objects"></a>
<h2 id="date-objects">Date <span lang="zh-cn">对象</span></h2>
<a name="date-prototype-object"></a>
<h3 >日期原型对象</h3>
<a name="function-properties"></a>
<h4 >函数属性</h4>
<ul>
<li>toString()</li>
<li>toDateString()</li>
<li>toTimeString()</li>
<li>toLocaleString()</li>
<li>toLocaleDateString()</li>
<li>toLocaleTimeString()</li>
<li>valueOf()</li>
<li>getTime()</li>
<li>getFullYear()</li>
<li>getUTCFullYear()</li>
<li>getMonth()</li>
<li>getUTCMonth()</li>
<li>getDate()</li>
<li>getUTCDate()</li>
<li>getDay()</li>
<li>getUTCDay()</li>
<li>getHours()</li>
<li>getUTCHours()</li>
<li>getMinutes()</li>
<li>getUTCMinutes()</li>
<li>getSeconds()</li>
<li>getUTCSeconds()</li>
<li>getMilliseconds()</li>
<li>getUTCMilliseconds()</li>
<li>getTimeZoneOffset()</li>
<li>setTime(time)</li>
<li>setMilliseconds(ms)</li>
<li>setUTCMilliseconds(ms)</li>
<li>setSeconds(sec [, ms])</li>
<li>setUTCSeconds(sec [, ms])</li>
<li>setMinutes(min [, sec [, ms]])</li>
<li>setUTCMinutes(min [, sec [, ms]])</li>
<li>setHours(hour [, min [, sec [, ms]]])</li>
<li>setUTCHours(hour [, min [, sec [, ms]]])</li>
<li>setDate(date)</li>
<li>setUTCDate(date)</li>
<li>setMonth(month [, date])</li>
<li>setUTCMonth(month [, date])</li>
<li>setYear(year)</li>
<li>setFullYear(year [, month [, date]])</li>
<li>setUTCFullYear(year [, month [, date]])</li>
<li>toUTCString()</li>
<li>toGMTString()</li>
<li>toISOString()</li>
<li>toJSON()</li>
<li>[Symbol.toPrimitive](hint)</li>
</ul>
<p>此外，QML引擎还向<a href="qml-qtqml-date.html">Date</a>原型添加了以下功能:</p>
<ul>
<li><a href="qml-qtqml-date.html#timeZoneUpdated-method">timeZoneUpdated()</a></li>
<li><a href="qml-qtqml-date.html#toLocaleDateString-method">toLocaleDateString(locale, format)</a></li>
<li><a href="qml-qtqml-date.html#toLocaleString-method">toLocaleString(locale, format)</a></li>
<li><a href="qml-qtqml-date.html#toLocaleTimeString-method">toLocaleTimeString(locale, format)</a></li>
</ul>
<a name="regexp-objects"></a>
<h2 id="regexp-objects">RegExp <span lang="zh-cn">对象</span></h2>
<a name="regexp-prototype-object"></a>
<h3 >RegExp <span lang="zh-cn">原型对象</span></h3>
<a name="function-properties"></a>
<h4 ><span lang="zh-cn">函数对象</span></h4>
<ul>
<li>exec(string)</li>
<li>test(string)</li>
<li>toString()</li>
</ul>
<a name="error-objects"></a>
<h2 id="error-objects">Error <span lang="zh-cn">对象</span></h2>
<h3 >错误的原型对象</h3>
<a name="value-properties"></a>
<h4 ><span lang="zh-cn">值属性</span></h4>
<ul>
<li>name</li>
<li>message</li>
</ul>
<a name="function-properties"></a>
<h4 >函数属性</h4>
<ul>
<li>toString()</li>
</ul>
<a name="the-json-object"></a>
<h2 id="the-json-object">JSON对象</h2>
<a name="function-properties"></a>
<h3 >函数属性</h3>
<ul>
<li>parse(text [, reviver])</li>
<li>stringify(value [, replacer [, space]])</li>
</ul>
</div>
<!-- @@@qtqml-javascript-functionlist.html -->
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2019 The Qt Company Ltd.
   Documentation contributions included herein are the copyrights of
   their respective owners.<br/>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br/>    Qt and respective logos are trademarks of The Qt Company Ltd.     in Finland and/or other countries worldwide. All other trademarks are property
   of their respective owners. </p>
</div>
</body>
</html>
